﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/Main.master" AutoEventWireup="true"
	CodeFile="BuyTicket.aspx.cs" Inherits="Pages_BuyTicket" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
	<div>
		Станция отправки: <asp:DropDownList ID="ddlStartStantion" runat="server" DataTextField="Name" DataValueField="Id" OnSelectedIndexChanged="ddlStartStantion_SelectedIndexChanged"/><br />
		Станция назначения: <asp:DropDownList ID="ddlEndStantion" runat="server" DataTextField="Name" DataValueField="Id" /><br />
		Дата: <asp:TextBox ID="tbDate" runat="server" /><br />
		<asp:Button ID="btnSearch" runat="server" Text="Поиск" OnClick="btnSearch_Click"/>
		<br />
		<asp:GridView runat="server" ID="gvBuses" AutoGenerateColumns="false" Width="70%" HeaderStyle-HorizontalAlign="Center" GridLines="None" HorizontalAlign="Center">
			<Columns>
				<asp:BoundField DataField="Route_name" HeaderText="Название" />
				<asp:BoundField DataField="Bus_name" HeaderText="Автобус" />
				<asp:BoundField DataField="Trip_DateTime" HeaderText="Дата/время" />
				<asp:TemplateField ItemStyle-Font-Size="10px">
					<ItemTemplate>
						<a href="TicketBuy.aspx?id=<%# Eval("Trip_id") %>">купить билет</a>
					</ItemTemplate>
				</asp:TemplateField>
				<%--<asp:TemplateField ItemStyle-Font-Size="10px">
					<ItemTemplate>
						<asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="return confirm('Удалить?');" CommandArgument='<%# Eval("Id") %>' OnCommand="btnDelete_Command" Text="удалить" />
					</ItemTemplate>
				</asp:TemplateField>--%>
			</Columns>
		</asp:GridView>
	</div>
</asp:Content>
